import { Model, DataTypes } from 'sequelize'
import { sequelize } from '../db/sequelize.js'

class User extends Model { }
User.init(
    {
        username: {
            type: DataTypes.STRING,
            allowNull: false
        },
        email: {
            type: DataTypes.STRING,
            allowNull: false,
            unique: true
        },
        age: {
            type: DataTypes.INTEGER
        }
    },
    { sequelize, modelName: 'User' }
);

export default User